#ifndef AUDIOIN_H
#define AUDIOIN_H

#include <QObject>
#include <QDebug>
#include <QAudioInput>
#include <QAudioFormat>
#include <QAudioDeviceInfo>
#include "../common/singleton.h"

class audioIn: public QObject
{
    Q_OBJECT
private:
    QAudioDeviceInfo input_Device; //音频输入设备
    QAudioInput *audioInput;
    QIODevice *input_stream;
    QAudioFormat settings;

    friend class SingleTon<audioIn>;
    audioIn(QObject *parent = nullptr);
    audioIn(const audioIn&) = delete ;
    audioIn(audioIn&&) = delete ;

public:
    ~audioIn();
    void record_start();
    void record_stop();


};

#endif // AUDIOIN_H
